<?php
class Application_Form_Element_SiteTerrainTemps extends Zend_Form_Element
{
	public function init()
	{
		parent::init();
	}

	//@override
	public function loadDefaultDecorators() {
		$this->setDecorators(array(
				'PrepareElements',
				array(
						'ViewScript',
						array('viewScript' => 'Element/SiteTerrainTemps/default.phtml')
				)
		));
	}

	//@override
	public function isValid ($value, $context = null) {
		//$isValid = parent::isValid($value, $context);
		$isValid = true;
		if (is_array($value)) {
			foreach ($value as &$v) {
				if (!filter_var($v, FILTER_VALIDATE_FLOAT)) {
					$isValid &= false;
				}
			}
		}
		return $isValid;
	}
}